Skip to content

Port: play the cursor sound when the mouse moves a menu cursor - #107

Closed
carrdylan52 wants to merge 6 commits into
TheMoonPeople:masterfrom
carrdylan52:pr/mouse-cursor-sounds
Closed

carrdylan52 wants to merge 6 commits into
TheMoonPeople:masterfrom
carrdylan52:pr/mouse-cursor-sounds

Conversation

@carrdylan52

Copy link
Copy Markdown
Contributor

Depends on #106 (stacked on it; the diff shows its commit until it merges). The change here is the last commit.

Before: hover and the wheel moved several menu cursors silently (shop goods, bag and quantity board, the ITEM page's build-up list, the same index on another ITEM panel), and the fishing-rod stats sounded twice.
After: each real mouse cursor change plays the retail cursor sound exactly once, including at list ends and quantity limits.
How: MenuMouseCursorSound plays SYSTEM_SE_CURSOR at most once a tick for cursors the adapters set themselves; moves the retail step already sounds (synthesized directions, MenuMouseMove, the post-hook cursor check) stay retail's. The shop predicts whether the retail press it sends will move (RetailMoves) and sounds its own change only when it won't. A PORT_OVERRIDE MenuSePlay(int) keeps the retail body and counts sounds for tests. PC SETTINGS rows stay silent, as with the keyboard.
Tests: sound-count cases in the shop, item, world map and menu tests, including limits and pane switches.

Hover selects cards, items, badges and class rows; a click confirms and a
right click backs out; the wheel scrolls lists and eases the item grid like
the D-pad scroll. Pages without targets ignore stray left clicks, and a
click wins over a wheel notch in the same frame.
Character page portraits take hover and click; only a portrait click
confirms, and left clicks do nothing while a character change loads.
Cedric's repair board takes hover, wheel and item clicks, and its input
no longer reaches his command list after it closes. The menu pointer
keeps one facing: retail mirrors the hand at Max, which made the
pointer's body jump across its hotspot.

Retail Options rows and buttons follow hover and the wheel scrolls the
list; Help entries follow hover and scroll, and the wheel turns its
picture pages. Rows are hit where they are drawn and only inside the
list's clip, so a row sliding under the footer cannot be clicked.
The FPS capture and presentation now record the FPS counter and menu
pointer through one helper, so a capture shows the pointer where a
presented frame does. The usage text and PC.md say so.
A notch over the bag moved the cursor a row while the board stayed put, so
with the pointer on the top row the selection and its Sell price popup
walked away from it. A goods list or bag longer than its window now
scrolls one row per notch through the retail eased scroll (MenuMouseScroll
for the list, the ITEM page's ScrollTop and WheelTarget for the bag), and
the cursor takes the entry that settles under the pointer. Rows sliding
out of the window can no longer be hovered, so a hover cannot scroll the
pane back. A list that fits still moves its cursor through the retail keys.
The wheel never enters an empty goods list, as retail keeps the bag in
front when stock runs out.
Hover and the wheel moved several menu cursors silently: shop goods, bag
and quantity board, the ITEM page's build-up list and the same index on
another ITEM panel. MenuMouseCursorSound plays SYSTEM_SE_CURSOR at most
once a tick from the adapters that set a cursor themselves; paths where
retail already sounds the move (synthesized directions, MenuMouseMove,
the post-hook cursor check) are left to retail. In the shop, the adapter
sounds its own pane or quantity change only when the retail press it
sends will not move, so each real change sounds once, at limits too. The
fishing-rod stats no longer sound twice. PC SETTINGS rows stay silent, as
with the keyboard.
@carrdylan52

Copy link
Copy Markdown
Contributor Author

Opened from a stale pre-merge branch by mistake; replaced by #109.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant